package cn.com.shadowless.xinning.api;

import java.util.Map;

import cn.com.shadowless.xinning.model.RequestResult;
import cn.com.shadowless.xinning.model.login.LoginInfo;
import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * The interface Login inter face.
 *
 * @author sHadowLess
 */
public interface Login {

    /**
     * Login info observable.
     *
     * @param map the map
     * @return the observable
     */
    @FormUrlEncoded
    @POST("api/User/Login")
    Observable<RequestResult<LoginInfo>> loginInfo(
            @FieldMap Map<String, String> map
    );

    /**
     * Logout info observable.
     *
     * @param account the account
     * @return the observable
     */
    @GET("api/User/Logout")
    Observable<RequestResult<Object>> logoutInfo(
            @Query("account") String account
    );
}
